$(function() {
	var url = 'http://ittalentsapi.bashibozuk.eu/game?X-GameID=103&expand=user&page=1&per-page=5&sortField=score&sortDirection=DESC';
	$.ajax(url, {
		method: 'GET',
		crossDomain : true,
		success: function(data,request) {
			var string = '';
			for(var i=1;i<=5;i++) {
				string+='<div class="player_row"><span class="player_numh">'+i+'</span><span class="player_nameh">'+data[i-1].user.username+'</span><span class="player_scoreh">'+data[i-1].score+'</span></div>';
			}
			$('#target').html(string);
		}
	});		
});